<?php
/**
 * 微服务-通用助手类
*/

namespace houze\rpc;

class Currency
{ 
    /**
     * AES加密方法
    */
    public function aes_encrypt($data) {  
        $config = \houze\Config::get('rpc');
        return openssl_encrypt($data, $config['aes_method'], $config['aes_key'], 0, $config['aes_iv']);  
    }  
  
    /**
     * AES解密方法
    */  
    public function aes_decrypt($data) {  
        $config = \houze\Config::get('rpc');
        return openssl_decrypt($data, $config['aes_method'], $config['aes_key'], 0, $config['aes_iv']);  
    } 
}